With a reduction in size of a portable communication device or the like, the number of devices having a folding mechanism is on the rise. A method of detecting a state of the folding mechanism includes a method using a magnet and a magnetic sensor circuit. In the magnetic sensor circuit, when the magnetic detection element and a signal processing circuit are integrally formed on a semiconductor IC using a silicon substrate, a Hall element is generally used as the magnetic detection element. FIG. 5 illustrates the magnetic sensor circuit using the Hall element (see Patent Document 1).
The magnetic sensor circuit illustrated in FIG. 5 includes a comparator circuit 7 with a hysteresis function to which a Hall voltage having a monotonically increasing relationship with a forward magnetic flux passing through a Hall element 1 is input, and a comparator circuit 8 with a hysteresis function to which a Hall voltage having a monotonically increasing relationship with a reverse magnetic flux passing through the Hall element 1 is input, to perform the logical OR operation between the respective outputs thereof. Therefore, whether or not there is a magnet at a close position can be detected independently of a magnetic polarity of the magnet.
FIG. 6 illustrates a relationship between the magnetic flux passing through the Hall element and an output signal in the magnetic sensor circuit of FIG. 5.
Patent Document 1: JP 2005-260629 A